/**
 * 项目名：化工企业安全生产信息化管理平台
 * 日期：    2020-03-01 22:19:09
 * Copyright (c) 2015- -版权所有
 */
package com.joysuch.wwyt.edu.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.joysuch.wwyt.core.exception.BusinessRestrictionsException;
import com.joysuch.wwyt.edu.bean.EduTestPaperQuestionDetailBean;
import com.joysuch.wwyt.edu.bean.EduTestPaperQuestionEditBean;
import com.joysuch.wwyt.edu.bean.EduTestPaperQuestionListBean;
import com.joysuch.wwyt.edu.entity.EduTestPaperQuestion;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;

import java.util.List;

import static com.joysuch.wwyt.edu.bean.EduTestPaperQuestionListBean.SearchEduTestPaperQuestion;

public interface EduTestPaperQuestionService extends IService<EduTestPaperQuestion> {

    public EduTestPaperQuestion add(EduTestPaperQuestionEditBean entity);

    void update(EduTestPaperQuestionEditBean entity);

    Page<EduTestPaperQuestionListBean> findByPage(Pageable page, SearchEduTestPaperQuestion condition);

    void delete(Long id) throws BusinessRestrictionsException;

    EduTestPaperQuestionDetailBean getById(Long id);

    EduTestPaperQuestion findById(Long id);

    /**
     * 根据试卷id查询试题
     * @param paperId
     * @return
     */
    List<EduTestPaperQuestion> findByPaperId(Long paperId);

    int countByPaperId(Long id);
}
